<?php 
class Files_CategoriesController extends Zend_Controller_Action {
	public function listAction() {
		
		$parentId = $this->_getParam('category')==null?0:$this->_getParam('category');
		$categories = Application_Model_Category::findByParentId($parentId);
		$files = Application_Model_File::findByCategoryId($parentId);
		
		$this->view->categories = $categories;
		$this->view->files = $files;
	}
}